import { loginResult } from '@/types/login'
import { defineStore } from 'pinia'

export const useMemberStore = defineStore(
  'member',
  () => {
    const profile = ref<loginResult>()
    
    const setProfile = (val: loginResult) => {
      profile.value = val
    }
    const clearProfile = () => {
      profile.value = undefined
    }
    return {
      profile,
      setProfile,
      clearProfile,
    }
  },
  {
    persist: true,
  },
)
